From: Keir Fraser Date: Tue, 6 May 2008 14:31:15 +0000 (+0100) Subject: xend: Only import OpenSSL package when it is required. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~65 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=9787d88dcf3e7c78c544840f420d3f194d80e631;p=xen.git xend: Only import OpenSSL package when it is required. Signed-off-by: Keir Fraser --- diff --git a/tools/python/xen/web/tcp.py b/tools/python/xen/web/tcp.py index f444c208d3..0ffb3fb0db 100644 --- a/tools/python/xen/web/tcp.py +++ b/tools/python/xen/web/tcp.py @@ -22,8 +22,6 @@ import re import socket import time -from OpenSSL import SSL - import connection from xen.xend.XendLogging import log @@ -82,6 +80,7 @@ class SSLTCPListener(TCPListener): def createSocket(self): + from OpenSSL import SSL # make a SSL socket ctx = SSL.Context(SSL.SSLv23_METHOD) ctx.set_options(SSL.OP_NO_SSLv2)